#include <my_head.h>

void sig_func(int signum){
    if(SIGALRM == signum){
        printf("自动出牌\n");
        alarm(5); 
    }
}

int main(int argc, const char *argv[]){
    signal(SIGALRM, sig_func);
    alarm(5);
    while(1){
        getchar(); 
        printf("手动出牌\n");
        alarm(5); 
    }
    return 0;
}